import request from "@/utils/request";

// 登录
export const reqdocLogin=(account,password)=>{
  return request({
    url:'/api/doctor/log',
    method:'POST',
    data:{
      account,
      password
    }
  })
}

// 重置密码
export const reqdocReset=(id,password)=>{
  return request({
    url:'/api/doctor/FirstUpdatePassword',
    method:'PUT',
    data:{
      id,
      password
    }
  })
}

// 获取当前预约人数
export const reqCurrentNum=(doctorId)=>{
  return request({
    url:`/api/doctor/getReserveNum/${parseInt(doctorId)}`,
    method:'GET',
  })
}

// 设置预约人数
export const reqhandleChange=(doctorId,amNum,pmNum)=>{
  return request({
    url:'/api/doctor/reserveNum',
    method:'PUT',
    params:{
      doctorId,
      amNum,
      pmNum
    }
  })
}

// 获取用户信息
export const reqGetInfo=(userId)=>{
  return request({
    url:`/api/doctor/getUserInfo/${userId}`,
    method:'GET'
  })
}